cmake_minimum_required(VERSION 3.28)
project(chat)

set(CMAKE_CXX_STANDARD 17)

#添加第三方库
#添加这个json反射才能起作用
set(muduo_DIR ${PROJECT_SOURCE_DIR}/thirdPkg/muduo)
find_package(muduo)
set(jsoncpp_DIR ${PROJECT_SOURCE_DIR}/thirdPkg/jsoncpp)
find_package(jsoncpp)
set(mysql_DIR ${PROJECT_SOURCE_DIR}/thirdPkg/mysql)
find_package(mysql)

#第三方包的头文件所在路径
include_directories(
        ${PROJECT_SOURCE_DIR}/thirdPkg
        ${PROJECT_SOURCE_DIR}/thirdPkg/jsoncpp/include
        ${PROJECT_SOURCE_DIR}/thirdPkg/mysql/include
)
#第三方包的库所在路径
link_directories(
        ${PROJECT_SOURCE_DIR}/thirdPkg/jsoncpp/lib
        ${PROJECT_SOURCE_DIR}/thirdPkg/muduo/lib
        ${PROJECT_SOURCE_DIR}/thirdPkg/mysql/lib
)

add_subdirectory(src)
add_subdirectory(test)

